package com.jml.consumer;

import com.jml.entity.MsgEntity;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;


@Service
@Slf4j
@RocketMQMessageListener(consumerGroup = "jml-gp01", topic = "topic_mt_jml")
public class RocketMQConsumer implements RocketMQListener<MsgEntity> {
    @Override
    public void onMessage(MsgEntity msgEntity) {
        log.info("消费者监听到消息：<msg:{}>", msgEntity);
    }
}
